using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ButtonPos : MonoBehaviour
{
    public Vector2Int pos;
    public Image backImage;
    public Image containerImage;
    public Text textComponent;
    public Button button;
    public bool isHide = false;

    private Color textColor;

    public void InitializeButton()
    {
        textColor = textComponent.color;
    }

    public void ResetButton()
    {
        isHide = false;
        backImage.enabled = true;
        containerImage.enabled = true;
        textComponent.enabled = true;
        button.enabled = true;

        backImage.sprite = null;
        containerImage.sprite = null;
        textComponent.text = "";
        textComponent.color = textColor;

        button.onClick.RemoveAllListeners();
    }

    public void HideLinkComponent()
    {
        backImage.enabled = false;
        containerImage.enabled = false;
        textComponent.enabled = false;
        button.enabled = false;
        isHide = true;
    }
}
